package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.example.model.Tag;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TagMapper extends BaseMapper<Tag> {

    List<Tag> queryAllTagByUserId(@Param("userId") Long userId);

    List<Tag> queryTagByArticleId(@Param("articleId") Long articleId);

    void insertArticleTag(@Param("id") long id,
                          @Param("articleId") Long articleId,
                          @Param("tagId") Long tagId);
}
